import { PrismaClient } from '@prisma/client'
import { Injectable } from '@nestjs/common'
@Injectable()
export class PrismaService extends PrismaClient {
  constructor() {
    const mode = process.env.$NODE_ENV ? process.env.$NODE_ENV : 'development'
    if (mode === 'development') {
      super({ log: ['query', 'warn', 'error'] })
    } else {
      super()
    }
  }
}
